package class_05;
/*
 * 怎么做出长度为0-m-1的bit类型数组，拿基础类型来拼；
 */
public class BitTest {
    public static void main(String[] args) {
        int[] arr = new int[1000];//1000*32=32000bit
        int singleIntIsBit = 32;
        int index = 30000;
        int intIndex = index/singleIntIsBit;
        int bitIndex = index%singleIntIsBit;
        System.out.println(intIndex+" "+bitIndex);
        //(1<<bitIndex)是将第intIndex桶内的第bitIndex位上的0变为1； 
        System.out.println(intIndex);
        System.out.println((1<<bitIndex));
        arr[intIndex] = arr[intIndex] | (1<<bitIndex);
        System.out.println(arr[intIndex]);
        
    }
}